@extends('home.frame')

@section('content')
<link href="/ho/css/appstyle.css" rel="stylesheet" type="text/css">
<div class="user-comment">
						<!--标题 -->
						<div class="am-cf am-padding">
							<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">发表评论</strong> / <small>Make&nbsp;Comments</small></div>
						</div>
						<hr/>
						@if(session('error'))
						<div style="color:red;" class="one" onclick="this.style.display='none'">
						    验证失败：
						      <ul>
						        <li>{{session('error')}}</li>
						      </ul>
						  </div>
						@endif
						<form action="/home/comment/insert?gid={{$good->gid}}" method="post">
						{{csrf_field()}}
						<div class="comment-main">
							<div class="comment-list">
								<div class="item-pic">
									<a href="#" class="J_MakePoint">
										<img src="http://lamp187mall.oss-cn-beijing.aliyuncs.com/{{$good->gphoto}}" class="itempic">
									</a>
								</div>

								<div class="item-title">

									<div class="item-name">
										<a href="/home/good/{{$good->gid}}">
											<p class="item-basic-info">{{$good->gname}}</p>
										</a>
									</div>
									<div class="item-info">
										<div class="info-little">
											<span>规格：{{$good->gfeature}}</span><br>
											<span></span>
										</div>
										<div class="item-price">
											价格：<strong>{{$good->gcost}}</strong>
										</div>										
									</div>
								</div>
								<div class="clear"></div>
								<div class="item-comment">
									<textarea placeholder="请写下对宝贝的感受吧，对他人帮助很大哦！" name="gccontent" id="gccontent"></textarea>
								</div>
								<div class="filePic">
								</div>
								<div class="item-opinion">
									<li><i class="op1"></i>好评</li>
									<li><i class="op2"></i>中评</li>
									<li><i class="op3"></i>差评</li>
									<input type="hidden" name="gcstatus" value="" id="gcstatus">
								</div>
							</div>
							<br/>
								<div class="info-btn">
									<button class="am-btn am-btn-danger" disabled id='btn'>发表评论</button>
								</div>							
					<script type="text/javascript">
						$(document).ready(function() {
							$(".comment-list .item-opinion li").click(function() {	
								$(this).prevAll().children('i').removeClass("active");
								$(this).nextAll().children('i').removeClass("active");
								$(this).children('i').addClass("active");
								$('#gcstatus').val($(this).text());
							});
						$('#gccontent').blur(function(){
							if($('#gcstatus').val() && $('#gccontent').val()){
								$('#btn').removeAttr('disabled');
							}
						})
						
				     })
					</script>					
					
												
							
						</div>
						</form>

					</div>
@endsection